package com.ssm.user.controller;

import com.ssm.user.excel.UserExcelExport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@RestController
@Api(value = "用户数据导出")
@RequestMapping("UserExport")
@Slf4j
public class UserExcelExportController {

    @Resource
    private UserExcelExport userExcelExport;

    @ApiOperation(value = "导出excel")
        @GetMapping("exportData")
    public void exportData() {
        //设置查询条件
        Map<String, Object> map = new HashMap<>();
        userExcelExport.exportWithBigData("用户列表", map);
    }
}
